<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEduStoresTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('edu_stores', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('user_id')->comment('存放收藏的用户id');
            $table->unsignedInteger('store_id')->comment('收藏内容的主键id(可以是课程,帖子等等内容)');
            $table->string('store_type')->comment('用户具体收藏内容的模型类名');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('edu_stores');
    }
}
